package com.zlz.blog.server.oauth.service;

import com.zlz.blog.manage.common.entity.oauth.LoginResult;
import com.zlz.blog.manage.common.entity.oauth.LoginUser;
import com.zlz.blog.manage.common.response.ResultSet;

import javax.servlet.http.HttpServletRequest;

/**
 * @author zhulinzhong
 * @version 1.0 CreateTime:2020-11-18 11:53
 * @description
 */
public interface LoginUserService {

    /**
     * 用户注册
     *
     * @param loginUser
     * @param type
     * @return
     */
    ResultSet<LoginResult> registerUser(HttpServletRequest request, LoginUser loginUser, String type);

    /**
     * 用户登录
     *
     * @param loginUser
     * @param type
     * @return
     */
    ResultSet<LoginResult> login(HttpServletRequest request, LoginUser loginUser, String type);

    LoginUser findByEmail(String email);

    LoginUser findByUsername(String name);

    LoginUser findByUserId(Long userId);
}
